<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Canvas测试</title>
</head>
<body>
    <canvas id="canvas" style="border: 1px #aaa solid;display: block;margin: auto"></canvas>

<script>
    var canvas = document.getElementById('canvas');
    canvas.width = 1000;
    canvas.height = 600;

    var context = canvas.getContext('2d');

    /*
    context.moveTo(100,100);
    context.lineTo(500,500);
    context.lineTo(100,500);
    context.lineTo(100,100);

     context.fillStyle = 'rgb(2,100,30)';
     context.fill();

    context.lineWidth = 5;
    context.strokeStyle = '#0e90d2';
    context.stroke();
    */

    context.lineWidth = 5;
    context.strokeStyle = '3005588';
    context.arc(300,300,200,0,1*Math.PI,true);
    context.stroke();

</script>
</body>
</html>